package com.gdqy.FCS.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gdqy.FCS.dao.DesignerInfoDao;
import com.gdqy.FCS.entity.DesignerInfo;

@Service
@Transactional
public class DesignerInfoService {
	
	@Autowired 
	private DesignerInfoDao designerInfoDao;
	
	public int insert(DesignerInfo designerInfo){
		
	 return designerInfoDao.insert(designerInfo);
		
	}
	
	public int delete(DesignerInfo designerInfo){
		return designerInfoDao.delete(designerInfo);
	}
	
	public int update(DesignerInfo designerInfo){
		return designerInfoDao.update(designerInfo);
	}
	//通过id查询设计师信息
	public DesignerInfo selectById(int id){
		return designerInfoDao.selectById(id);
	}
	//通过名字查询设计师信息
	public DesignerInfo selectByName(String name){
		return designerInfoDao.selectByName(name);
	}
	
	public DesignerInfo selectByUser_id(int id){
		return designerInfoDao.selectByUser_id(id);
	}
	
	public int selectAllCount(){
		return designerInfoDao.selectAllCount();
	}
}
